<?php

class Application_Model_MyProductx {

    protected $id;
    protected $product;
    protected $cat_id;
    protected $cat;
    protected $manufac_id;
    protected $manufac;
    protected $image;
    protected $descript;
    protected $model;
    protected $made_in;
    protected $size;
    protected $power;
    protected $xuse;
    protected $warranty;
    protected $price;
    protected $post_date;
    protected $poster;
    protected $times;
    protected $xshow;

    public function __construct(array $options = null) {
        if (is_array($options)) {
            $this->setOptions($options);
        }
    }

    public function __set($name, $value) {
        $method = 'set' . $name;
        if (('mapper' == $name) || !method_exists($this, $method)) {
            throw new Exception('Invalid content property');
        }
        $this->$method($value);
    }

    public function __get($name) {
        $method = 'get' . $name;

        if (('mapper' == $name) || !method_exists($this, $method)) {
            throw new Exception('Invalid content property');
        }

        return $this->$method();
    }

    public function setOptions(array $options) {
        $methods = get_class_methods($this);

        foreach ($options as $key => $value) {
            $method = 'set' . ucfirst($key);

            if (in_array($method, $methods)) {
                $this->$method($value);
            }
        }

        return $this;
    }

    public function getId() {
        return $this->id;
    }

    public function setId($id) {
        $this->id = $id;
    }

    public function getProduct() {
        return $this->product;
    }

    public function setProduct($product) {
        $this->product = $product;
    }

    public function getCat_id() {
        return $this->cat_id;
    }

    public function setCat_id($cat_id) {
        $this->cat_id = $cat_id;
    }

    public function getCat() {
        return $this->cat;
    }

    public function setCat($cat) {
        $this->cat = $cat;
    }

    public function getManufac_id() {
        return $this->manufac_id;
    }

    public function setManufac_id($manufac_id) {
        $this->manufac_id = $manufac_id;
    }

    public function getManufac() {
        return $this->manufac;
    }

    public function setManufac($manufac) {
        $this->manufac = $manufac;
    }

    public function getImage() {
        return $this->image;
    }

    public function setImage($image) {
        $this->image = $image;
    }

    public function getDescript() {
        return $this->descript;
    }

    public function setDescript($descript) {
        $this->descript = $descript;
    }

    public function getModel() {
        return $this->model;
    }

    public function setModel($model) {
        $this->model = $model;
    }

    public function getMade_in() {
        return $this->made_in;
    }

    public function setMade_in($made_in) {
        $this->made_in = $made_in;
    }

    public function getSize() {
        return $this->size;
    }

    public function setSize($size) {
        $this->size = $size;
    }

    public function getPower() {
        return $this->power;
    }

    public function setPower($power) {
        $this->power = $power;
    }

    public function getXuse() {
        return $this->xuse;
    }

    public function setXuse($xuse) {
        $this->xuse = $xuse;
    }

    public function getWarranty() {
        return $this->warranty;
    }

    public function setWarranty($warranty) {
        $this->warranty = $warranty;
    }

    public function getPrice() {
        return $this->price;
    }

    public function setPrice($price) {
        $this->price = $price;
    }

    public function getPost_date() {
        return $this->post_date;
    }

    public function setPost_date($post_date) {
        $this->post_date = $post_date;
    }

    public function getPoster() {
        return $this->poster;
    }

    public function setPoster($poster) {
        $this->poster = $poster;
    }

    public function getTimes() {
        return $this->times;
    }

    public function setTimes($times) {
        $this->times = $times;
    }

    public function getXshow() {
        return $this->xshow;
    }

    public function setXshow($xshow) {
        $this->xshow = $xshow;
    }

}